FROM python:3.9.2

#内网专用需配置代理
ENV http_proxy="proxyValue"
ENV https_proxy="proxyValue"
ENV ftp_proxy="proxyValue"

ARG MINDINSIGHT_PKG=mindinsight-*-py3-none-any.whl
WORKDIR /tmp
COPY $MINDINSIGHT_PKG start.sh ./

RUN chmod a+x ./start.sh

#内网专用，pip使用华为源
RUN pip install --upgrade pip pipValue && \
    pip install $MINDINSIGHT_PKG pipValue && \
    rm $MINDINSIGHT_PKG

#清除代理
ENV http_proxy=
ENV https_proxy=
ENV ftp_proxy=

RUN sed -i "/^HOST/cHOST = '0.0.0.0'" /usr/local/lib/python3.9/site-packages/mindinsight/conf/constants.py
